Introduction: MAPS Banding

This project explores capture and recapture data for six chickadee species across North America using the MAPS (Monitoring Avian Productivity and Survivorship) dataset. The goal is to visualize spatial distributions, estimate species ranges, and assess trends in abundance and recapture rates over time.

The chickadee species included are as follows:
* Black-Capped Chickadee (BCCH)
* Boreal Chickadee (BOCH)
* Carolina Chickadee (CACH)
* Chesnut-Backed Chickadee (CBCH)
* Mountain Chickadee (MOCH)
* Carolina x Black-Capped Hybrid (CBCC)


Data Cleaning and Preparation

Load in capture and location data sets, join, and clean:

capture_data <- read_csv("MAPS_BANDING_capture_data.csv")
location_data <- read_csv("MAPS_STATION_location_and_operations.csv")

joined_data <- left_join(capture_data, location_data, by = c("LOC", "STA", "STATION"))

dat <- joined_data %>% 
  select(LATITUDE, LONGITUDE, LOC, STA, STATION, DATE, C, BAND, SPEC, AGE, SEX, 
         F, STATUS) %>% 
  rename(latitude = LATITUDE, longitude = LONGITUDE, location = LOC, station_num 
         = STA, station_code = STATION, date = DATE, capture_code = C, band_num 
         = BAND, species = SPEC, age = AGE, sex = SEX, fat = F, status = STATUS)

Convert latitude and longitude from degrees minutes seconds (DMS) to decimal degrees (DD):

dms_to_dd <- function(dms_str) { 
  sapply(dms_str, function(x) {
    parts <- strsplit(x, " ")[[1]]
    if (length(parts) != 3) return(NA)
    deg <- as.numeric(parts[1])
    min <- as.numeric(parts[2])
    sec <- as.numeric(parts[3])
    sign <- ifelse(deg < 0, -1, 1)
    deg <- abs(deg)
    sign * (deg + min / 60 + sec / 3600)
  })
}

dat$latitude <- dms_to_dd(dat$latitude)
dat$longitude <- dms_to_dd(dat$longitude)

dat <- dat %>%
  mutate(date = as.Date(date),
         year = year(date),
         month = month(date),
         day = day(date)) %>%
  filter(!is.na(latitude), !is.na(longitude))

Species Distribution Maps

Static Capture Map

Faceted Hexbin Density Map

Animated Range Over Time

Range Estimation Using Hulls

Convex Hulls

Concave Hulls